Replication Files for "The Opportunities and Limits of Microtargeting Cross-Pressured Voters" by Philip Moniz, Kyle Endres, and Costas Panagopolous. 

Code

code.R is R syntax that contains code to generate the tables and figures in the main text and appendix. You will need to set your working directory to the folder containing the datasets in order for the code to produce the output. 

Datasets

There are 4 datasets analyzed in code.R. The first, “individual_level_data.csv” contains the individual-level data. This dataset contains numerous variables, which are described in the appendix, section B. Key variables in this dataset include: 

correct_pct: proportion of correctly predicted policy positions, i.e., sum of correct predictions / total valid predictions (per respondent).

cross_pct: proportion of cross-pressured policy positions, i.e., sum of cross-pressured positions / total valid positions (per respondent).

missing_pct: proportion of missing policy positions, i.e., sum of missing predicted positions /total positions (per respondent).


The dataset “policy_level_data.csv” contains data at the policy level. This dataset has three variables: “cp” is cross-pressure (proportion of voters who are cross-pressured on that issue), “value” is accuracy (the proportion of voters who were correctly predicted on that issue, “n” is the number of valid predictions on that issue, “ms” is missingness (the proportion of missing predictions on that issue), and finally, “name” is the name given to each policy. 

The remaining two datasets are constructed in the same manner as "policy_level_data.csv", except that the proportions are calculated among certain subgroups. In "policy_level_gender_data.csv", they are calculated separately for men and women. In "policy_level_race_data.csv", they are calculated separately for white and nonwhite respondents.  

Programming and Hardware

The analyses were originally run on R version 4.5.2 on an Apple M4 MacBook Pro running MacOS Tahoe 26.2. The packages used were the following: 

tidyverse 2.0.0
texreg 1.39.5